 |
|
|
|
|
Simple Object-based Design |
|
|
|
| |
 |
|
|
|
|
Other Examples of Classes |
|
|
|
| |
 |
|
|
|
|
Advantages of OOP |
|
|
|
| |
 |
|
|
|
|
Encapsulation |
|
|
|
| |
 |
|
|
|
|
Polymorphism |
|
|
|
| |
 |
|
|
|
|
Testing |
|
|
|
| |
 |
|
|
|
|
Code Reusability |
|
|
|
| |
 |
|
|
|
|
Disadvantages of OOP |
|
|
|
| |
 |
|
|
|
|
The Learning Curve |
|
|
|
| |
 |
|
|
|
|
Performance |
|
|
|
| |
 |
|
|
|
|
Not Everything Is an Object |
|
|
|
| |
 |
|
|
|
|
Summary |
|
|
|
| |
 |
|
|
|
|
Review Questions |
|
|
|
| |
|
|
|
|
|
20
Creating Class Modules |
|
|
|
| |
 |
|
|
|
|
Visual Basic Class Modules |
|
|
|
| |
 |
|
|
|
|
Creating a Simple Class |
|
|
|
| |
 |
|
|
|
|
Reading Properties |
|
|
|
| |
 |
|
|
|
|
Class Initialization |
|
|
|
| |
 |
|
|
|
|
Writing to Properties |
|
|
|
| |
 |
|
|
|
|
Creating Property Get and Property Let Procedures |
|
|
|
| |
 |
|
|
|
|
The Class Builder Utility |
|
|
|
| |
 |
|
|
|
|
Methods |
|
|
|
| |
 |
|
|
|
|
Form Objects |
|
|
|
| |
 |
|
|
|
|
Creating Form Properties |
|
|
|
| |
 |
|
|
|
|
Property Procedures in the Employee Form |
|
|
|
| |
 |
|
|
|
|
The TextStream Class |
|
|
|
| |
 |
|
|
|
|
Writing to a File Using the TextStream Class |
|
|
|
| |
 |
|
|
|
|
Reading from a Text File |
|
|
|
| |
 |
|
|
|
|
The FileTooBig Property |
|
|
|
| |
 |
|
|
|
|
The Class_Terminate Event |
|
|
|
| |
 |
|
|
|
|
Warning About Global Objects |
|
|
|
| |
 |
|
|
|
|
Default Methods and Properties |
|
|
|
| |
 |
|
|
|
|
Summary |
|
|
|
| |
 |
|
|
|
|
Review Questions |
|
|
|
| |
 |
|
|
|
|
Exercises |
|
|
|
| |
| |
 |
|
|
|
|
What Is an Object? |
|
|
|
| |
 |
|
|
|
|
Object Types |
|
|
|
| |
 |
|
|
|
|
Generic Object Types |
|
|
|
| |
 |
|
|
|
|
Form and Control Objects |
|
|
|
| |
 |
|
|
|
|
What Do We Do with These Objects? |
|
|
|
| |
 |
|
|
|
|
Determining an Objects Type |
|
|
|
| |
 |
|
|
|
|
When to Use Generic Versus Specific Object Types |
|
|
|
| |
 |
|
|
|
|
Objects Are Passed by Reference |
|
|
|
| |
 |
|
|
|
|
System Objects |
|
|
|
| |
 |
|
|
|
|
Rules When Using System Objects |
|
|
|
| |
 |
|
|
|
|
The App Object |
|
|
|
| |
 |
|
|
|
|
Filling in the Application Information |
|
|
|
| |
 |
|
|
|
|
Checking for a Previous Instance |
|
|
|
| |
 |
|
|
|
|
The Screen Object |
|
|
|
| |
 |
|
|
|
|
Twips |
|
|
|
| |
 |
|
|
|
|
Displaying Screen Fonts |
|
|
|
| |
 |
|
|
|
|
Changing the Mouse Pointer |
|
|
|
| |
 |
|
|
|
|
The Clipboard Object |
|
|
|
| |
 |
|
|
|
|
Selecting Text |
|
|
|
| |
 |
|
|
|
|
Moving Text to the Clipboard |
|
|
|
| |
 |
|
|
|
|
The Screen.ActiveControl Property |
|
|
|
| |
 |
|
|
|
|
Creating New Forms at Runtime |
|
|
|
| |
 |
|
|
|
|
Summary |
|
|
|
| |
 |
|
|
|
|
Review Questions |
|
|
|
| |